\documentclass{article}
\usepackage[a4paper, margin=.5in]{geometry}
\usepackage{amsmath}
\begin{document}
\input{shakemat.tex}
\input{rattlemat.tex}
\end{document}